<script>
export default {
  name: "WorkOrderXJXView",
  data() {
    return {
      list: [],
      id1:0,
      // div: 0,
      form:{}
    }
  },
  methods: {
    index(id1) {
      this.$router.push({path: '/work_order_xq2', query: {id: id1}})
    },
    // div(key) {
    //   this.div = key
    // }
  },
  created() {
    // 获取参数
    this.id = this.$route.query.id
    // 查询
    this.axios.get(`http://localhost:9999/api-work-order-service/work-order/findById?id=`+this.id).then(res => {
      this.form = res.data.data;
      console.log(res)
      console.log(this.list)
    })
    this.id1 = this.id
  }
}
</script>

<template>
<div>
  <h3>巡检项:</h3>
  <el-form ref="form" :model="form" label-width="80px">
    <el-form-item label="空调开关">
      <el-radio-group v-model="form.workOrderPatrolOne">
        <el-radio :label="1">正常</el-radio>
        <el-radio :label="2">异常</el-radio>
      </el-radio-group>
    </el-form-item>
    <el-form-item label="灯开关">
      <el-radio-group v-model="form.workOrderPatrolTwo" >
        <el-radio :label="1">正常</el-radio>
        <el-radio :label="2">异常</el-radio>
      </el-radio-group>
    </el-form-item>
    <el-form-item label="消防门">
      <el-radio-group v-model="form.workOrderPatrolThree" >
        <el-radio :label="1">正常</el-radio>
        <el-radio :label="2">异常</el-radio>
      </el-radio-group>
    </el-form-item>
<!--    <el-form-item label="气体传感器">-->
<!--      <el-radio-group v-model="form.workOrderPatrolFour" @change="div(key)">-->
<!--        <el-radio :label="1" >正常</el-radio>-->
<!--        <el-radio :label="2" >异常</el-radio>-->
<!--      </el-radio-group>-->
<!--    </el-form-item>-->
<!--    <el-form-item v-if="div==2" label="温度">-->
<!--      <el-input v-if="div==2" v-model="form.workOrderPatrolFourOne" placeholder="请输入内容"></el-input>-->
<!--    </el-form-item>-->
  </el-form>
</div>
</template>

<style scoped>

</style>